/**
 * Description: MaintainReportStatusDAOImpl.java
 * Copyright (c) 2008-2009  Neo. 
 * All Rights Reserved.
 * @version 1.0  Mar 18, 2009 10:27:47 PM 李萌（neolimeng@gmail.com）created
 */
package org.paradise.dms.dao.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.paradise.dms.pojo.MaintainReportStatus;
import org.springframework.stereotype.Service;

import com.dheaven.framework.dao.BaseHibernateDao;
import com.dheaven.framework.dao.DaoException;

/**
 * Description: 报修状态维护DAO Copyright (c) 2008-2009 Neo. All Rights Reserved.
 * 
 * @version 1.0 Mar 18, 2009 10:27:47 PM 李萌（neolimeng@gmail.com）created
 */
@Service
public class MaintainReportStatusDAOImpl extends
		BaseHibernateDao<MaintainReportStatus> {
	private static Logger log = Logger.getLogger(MaintainReportStatusDAOImpl.class);
	/**
	 * 
	 * Description: 增加一种维修状态
	 * 
	 * @Version1.0 Mar 18, 2009 10:40:58 PM 李萌（neolimeng@gmail.com）创建
	 * @param maintainreportstatus
	 * @throws DaoException
	 */
	public void insertMaintainReportStatus(
			MaintainReportStatus maintainreportstatus) throws DaoException {
		this.create(maintainreportstatus);
		log.info("DMS_info:"+"增加一种报修状态:"+maintainreportstatus+"成功!");
	}

	/**
	 * 
	 * Description: 删除一种维修状态
	 * 
	 * @Version1.0 Mar 18, 2009 10:41:21 PM 李萌（neolimeng@gmail.com）创建
	 * @param maintainreportstatus
	 * @throws DaoException
	 */
	public void deleteMaintainReportStatus(
			MaintainReportStatus maintainreportstatus) throws DaoException {
		this.delete(maintainreportstatus);
	}

	/**
	 * 
	 * Description: 更新一种维修状态
	 * 
	 * @Version1.0 Mar 18, 2009 10:41:42 PM 李萌（neolimeng@gmail.com）创建
	 * @param maintainreportstatus
	 * @throws DaoException
	 */
	public void updateMaintainReportStatus(
			MaintainReportStatus maintainreportstatus) throws DaoException {
		this.update(maintainreportstatus);
	}

	/**
	 * 
	 * Description: 取得一种维修状态的信息
	 * 
	 * @Version1.0 Mar 18, 2009 10:42:00 PM 李萌（neolimeng@gmail.com）创建
	 * @param maintainreportstatusid
	 * @return
	 * @throws DaoException
	 */
	public MaintainReportStatus getMaintainReportStatus(
			int maintainreportstatusid) throws DaoException {
		return (MaintainReportStatus) this.find(
				"from MaintainReportStatus where maintainreportstatusid = ?",
				new Object[] { maintainreportstatusid });
	}

	/**
	 * 
	 * Description: 取得所有维修状态的信息
	 * 
	 * @Version1.0 Mar 18, 2009 10:42:20 PM 李萌（neolimeng@gmail.com）创建
	 * @return
	 * @throws DaoException
	 */
	public List<MaintainReportStatus> getMaintainReportStatuses()
			throws DaoException {
		return this.loadAll();
	}

}
